/* ===================================
   DyC Gestión Mecánica - Login Moderno
   =================================== */

:root {
    --primary-color: #1a73e8;
    --primary-dark: #0d47a1;
    --primary-light: #4285f4;
    --secondary-color: #ff6b35;
    --accent-color: #ffa726;
    --dark-bg: #0f1419;
    --dark-gradient: linear-gradient(135deg, #0f1419 0%, #1a2332 100%);
    --success-color: #4caf50;
    --error-color: #f44336;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--dark-gradient);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===================================
   CONTENEDOR PRINCIPAL
   =================================== */

.login-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ===================================
   LADO IZQUIERDO - BRANDING
   =================================== */

.login-left {
    flex: 1;
    background: var(--dark-gradient);
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-left::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://images.unsplash.com/photo-1486262715619-67b85e0b08d3?q=80&w=2000');
    background-size: cover;
    background-position: center;
    opacity: 0.08;
    filter: blur(2px);
    z-index: 0;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(26, 115, 232, 0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.brand-container {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 500px;
}

.brand-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    /*background: linear-gradient(135deg, var(--primary-color), var(--primary-light));*/
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(26, 115, 232, 0.4);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.brand-icon i {
    font-size: 60px;
    color: var(--white);
}

.brand-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.brand-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.brand-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 50px;
    font-weight: 300;
}

.features-list {
    display: grid;
    gap: 20px;
    margin-top: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(10px);
    border-color: var(--primary-light);
}

.feature-item i {
    font-size: 24px;
    color: var(--accent-color);
    min-width: 30px;
}

.feature-item span {
    color: var(--white);
    font-size: 16px;
    font-weight: 400;
}

/* Engranajes decorativos animados */
.decorative-gears {
    position: absolute;
    bottom: 40px;
    right: 40px;
    opacity: 0.1;
}

.decorative-gears i {
    position: absolute;
    color: var(--white);
}

.gear-1 {
    font-size: 80px;
    animation: rotate 10s linear infinite;
}

.gear-2 {
    font-size: 60px;
    left: 50px;
    top: 30px;
    animation: rotate-reverse 8s linear infinite;
}

.gear-3 {
    font-size: 40px;
    left: 90px;
    top: -10px;
    animation: rotate 6s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotate-reverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

/* ===================================
   LADO DERECHO - FORMULARIO
   =================================== */

.login-right {
    flex: 1;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.login-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(26, 115, 232, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(66, 133, 244, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.login-right.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.login-form-wrapper {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    /*background: linear-gradient(135deg, var(--primary-light), var(--primary-color));*/
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    
}

.login-icon i {
    font-size: 40px;
    color: var(--white);
}

.login-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.login-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.login-header p {
    font-size: 16px;
    color: var(--text-light);
    font-weight: 400;
}

/* Alerta de error */
.alert-error {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: #fee;
    border-left: 4px solid var(--error-color);
    border-radius: 8px;
    margin-bottom: 25px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.alert-error i {
    color: var(--error-color);
    font-size: 20px;
}

.alert-error span {
    color: #c62828;
    font-size: 14px;
    font-weight: 500;
}

/* Formulario */
.login-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.form-group label i {
    color: var(--primary-color);
    font-size: 16px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 15px 45px 15px 45px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    background: #f8fafc;
}

.input-wrapper input:focus {
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.1);
}

.input-wrapper input::placeholder {
    color: #94a3b8;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 18px;
    pointer-events: none;
    transition: color 0.3s ease;
}

.input-wrapper input:focus ~ .input-icon {
    color: var(--primary-color);
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary-color);
}

.toggle-password i {
    font-size: 18px;
}

/* Opciones del formulario */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 30px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.checkbox-wrapper input:checked ~ .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-wrapper input:checked ~ .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--white);
    font-size: 12px;
}

.checkbox-label {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
}

.forgot-link {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Botón de login */
.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.4);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(26, 115, 232, 0.3);
}

.btn-login i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.btn-login:hover i {
    transform: translateX(5px);
}

/* Footer del login */
.login-footer {
    margin-top: 30px;
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid #e2e8f0;
}

.login-footer p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-light);
}

.login-footer i {
    color: var(--success-color);
    font-size: 16px;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 1024px) {
    .login-left {
        padding: 40px;
    }
    
    .brand-title {
        font-size: 36px;
    }
    
    .features-list {
        gap: 15px;
    }
    
    .feature-item {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
    }
    
    .login-left {
        padding: 40px 20px;
        min-height: auto;
    }
    
    .brand-container {
        max-width: 100%;
    }
    
    .brand-icon {
        width: 80px;
        height: 80px;
        border-radius: 20px;
    }
    
    .brand-icon i {
        font-size: 40px;
    }
    
    .brand-title {
        font-size: 28px;
    }
    
    .brand-subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    .features-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .feature-item {
        padding: 12px 15px;
    }
    
    .feature-item i {
        font-size: 20px;
    }
    
    .feature-item span {
        font-size: 14px;
    }
    
    .decorative-gears {
        display: none;
    }
    
    .login-right {
        padding: 30px 20px;
    }
    
    .login-form-wrapper {
        max-width: 100%;
    }
    
    .login-header h2 {
        font-size: 26px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .brand-title {
        font-size: 24px;
    }
    
    .login-header h2 {
        font-size: 22px;
    }
    
    .input-wrapper input {
        padding: 12px 40px 12px 40px;
        font-size: 14px;
    }
    
    .btn-login {
        padding: 14px;
        font-size: 15px;
    }
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

